<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>CssRuleSet_ (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">cssom.iframe.style.CssRuleSet_</span>
        <span>Extends</span>
        <span class="fn-name">
          Object
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Class representing a CSS rule set. A rule set is something like this:
h1, h2 { font-family: Arial; color: red; }
  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_cssom_iframe_style.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/closure/goog/cssom/iframe/style.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td>goog.cssom.iframe.style.CssRuleSet_</td><td></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.cssom.iframe.style.CssRuleSet_(<span></span>)
  </div>



<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_cssom_iframe_style_CssRuleSet_.html">
              goog.cssom.iframe.style.CssRuleSet_
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.iframe.style.CssRuleSet_.prototype.clone"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">clone<span class="args">()</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_cssom_iframe_style_CssRuleSet_.html">goog.cssom.iframe.style.CssRuleSet_</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Make a copy of this ruleset.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_cssom_iframe_style_CssRuleSet_.html">goog.cssom.iframe.style.CssRuleSet_</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            A new CssRuleSet containing the same data as this one.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_iframe_style.js.source.html#line196">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.iframe.style.CssRuleSet_.prototype.initializeFromCssRule"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">initializeFromCssRule<span class="args">(<span class="arg">cssRule</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
      </div>


     <div class="entryOverview">
       Initializes the rule set from a <code>CSSRule</code>.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cssRule</span>
        : <div class="fullType">(<span class="type">CSSRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The <code>CSSRule</code> to initialize from.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>&nbsp;
            True if initialization succeeded. We only support <code>CSSStyleRule</code> and <code>CSSFontFaceRule</code> objects.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_iframe_style.js.source.html#line133">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.iframe.style.CssRuleSet_.prototype.setDeclarationTextFromObject"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setDeclarationTextFromObject<span class="args">(<span class="arg">sourceObject</span>,&nbsp;<span class="arg">opt_important</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Set the declaration text with properties from a given object.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">sourceObject</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">Object whose properties and values should be used to generate the declaration text.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_important</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">Whether !important should be added to each declaration.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_iframe_style.js.source.html#line211">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.iframe.style.CssRuleSet_.prototype.setSelectorsFromString"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setSelectorsFromString<span class="args">(<span class="arg">selectorsString</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Parses a selectors string (which may contain multiple comma-delimited
selectors) and loads the results into this.selectors.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">selectorsString</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">String containing selectors.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_iframe_style.js.source.html#line178">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.iframe.style.CssRuleSet_.prototype.writeToArray"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">writeToArray<span class="args">(<span class="arg">array</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Serializes this CssRuleSet_ into an array as a series of strings.
The array can then be join()-ed to get a string representation
of this ruleset.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">array</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The array to which to append strings.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_iframe_style.js.source.html#line234">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_cssom_iframe_style_CssRuleSet_.html">
              goog.cssom.iframe.style.CssRuleSet_
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.cssom.iframe.style.CssRuleSet_.prototype.declarationText"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">declarationText</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
     </div>


     <div class="entryOverview">
       Text of the declarations inside the rule set.
For example: 'font-family: Arial; color: red;'
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_iframe_style.js.source.html#line115">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>





  <a name="goog.cssom.iframe.style.CssRuleSet_.prototype.selectors"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">selectors</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type"><a href="class_goog_cssom_iframe_style_CssSelector_.html">goog.cssom.iframe.style.CssSelector_</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
     </div>


     <div class="entryOverview">
       Array of CssSelector objects, one for each selector.
Example: [h1, h2]
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_iframe_style.js.source.html#line122">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package cssom.iframe.style</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="cssom.iframe.style.CssRuleSet_"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
